home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / AT.BC < prev    next >
Text File  |  1990-02-16  |  2KB  |  75 lines

  1. let %!a = %1
  2. if %!a# = # goto ERROR
  3. let %!z = %!a
  4. gt %!z 24
  5. if errorlevel 1 goto ERROR
  6. if %!a = 0 Let %!a = 5
  7. goto TEST1
  8. :TEST1
  9. let %!b = %2
  10. if %!b# = # goto ERROR
  11. let %!z = %!b
  12. gt %!z 65
  13. if errorlevel 1 goto ERROR
  14. if %!b = 0 Let %!b = 1
  15. goto TEST2
  16. :TEST2
  17. let %!c = %3
  18. if %!c# = # GOSUB TEST2B
  19. goto TEST3
  20. :TEST2B
  21. let %!c = DIR
  22. return
  23. :TEST3
  24. let %!d = %4
  25. if %!d# = # GOSUB TEST3B
  26. goto SETUP
  27. :TEST3B
  28. let %!d = Input---\\62\\62
  29. return
  30. :SETUP
  31. let %!e = %!d
  32. GOTO ACT
  33. :ACT
  34. let %!f = *.*
  35. locate %!a %!b
  36. echonolf %!e\\32
  37. read %!f
  38. let %!z = %!f
  39. string_length %!z
  40. lt %!z 2
  41. if errorlevel 1 goto ACT
  42. COMMAND /C %!c %!f
  43. goto END
  44. :ACT
  45. !%!f
  46. :SYNTAX
  47. echo.
  48. echo       SYNTAX---:  AT [ROW(1-24)] [COLUMN(1-65)] [Command] [1word_prompt]
  49. echo       USAGE----:  Use in .BAT programs to interreact with users. Optional
  50. echo                   prompt is positioned at given row/column coordinates.
  51. echo                   If user inputs anything less than 2 characters, prompt
  52. echo                   line is repeated at same coordinates.
  53. echo.
  54. echo       EXAMPLE--:  AT 10 15 DIR Filespec?
  55. echo       EXAMPLE--:  AT 20 5 CD\ Name·of·Directory?:
  56. echo                               ^no spaces allowed^
  57. echo.
  58. echo Note:  AT uses the COMMAND \C option to run the optional [command].
  59. echo        [ROW] & [COLUMN] must be defined, [Command] defaults to DIR,
  60. echo        and [1word_prompt] defaults to Input---\\62\\62
  61. !echo        The prompt word accepts \\# where # is any value from 1 to 255
  62. !echo         Example:  Enter\\32a\\32Valid\\32Filespec----\\62\\62\62
  63. echo        Hint:  RENAME AT.EXE @.EXE
  64. echo.
  65. echo                   Freeware, copyright 1990, by Felix A. Rozewicz
  66. goto END
  67. :ERROR
  68. echo  Unable to verify validity of first 2 primary parameters.
  69. beep
  70. echo.
  71. waitkey 2
  72. goto SYNTAX
  73. :END
  74. EXIT
  75.